home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
015
/
printer1.arc
/
PRINTER1.DOC
< prev
Wrap
Text File
|
1984-10-21
|
8KB
|
147 lines
*****************************************************************************
** Dr. Bob's Utilities **
** **
** A Company Devoted to Testing Your Integrity **
** **
** Printer.com ** V1.0 **
*****************************************************************************
If you use this program and would like to pay me for my work and support
work on future utilities,
- Send $5.00
to:
- Dr. Bob's Utilities
- 444 Maple Lane
- St. Paul MN, 55112
Registered users will receive information about new uses, updates, new utility
programs, etc. They may also ask questions by mail or Mpls BBS's. (I hope to be
able to answer on CompuServe soon.)
If you would like to receive full source code in C, please send:
1. additional $5.00
2. SELF ADDRESSED STAMPED ENVELOPE
(let me know what other utilities you would find useful)
******************************************************************************
This program sends control codes to (as far as I can tell) any printer.
To run it, simply type PRINTER from DOS. You will then be prompted with
the message: "Enter Key:"
To send an Escape A, for example, just press the Esc key and then the A
key. Be sure to use upper case if that's what you printer manual calls for.
In some cases, you may need to send a decimal value rather than a key.
For example, on the Okidata 92, to get double-width characters you need to
send a decimal 31. There is no key on the keyboard with this ASCII value.
To send this code using PRINTER.COM, press CTRL-D (for decimal) and you will
see a new prompt: "Enter Decimal Code"
At this point, enter the decimal code you want to send.
CAUTION: All decimal codes must be two-digits long. Put a 0 in front of
values less than 10. To send a decimal 2, enter 02.
If you need to send a decimal value greater than 99, you can often
use a key rather than a decimal code. For example, to send a decimal 116
just type a lower-case t.
PRINTER.COM will let you enter up to 80 codes in a row so it can be used to
print a title as well as to set up the printer. On the Okidata 92 the
following sequence will print "TITLE" in correspondence quality , double-
width characters and then set up the printer for regular printing at 10
characters per inch:
<Esc> <1> <CTRL-D> <3><1> <space> <space> <space> <T><I><T><L><E> <CTRL-D>
<3><0> <ESC> <0> <ENTER>
The spaces are optional. They can be used to center a message on the
paper. A <CTRL-J> imbedded in the string will produce a carriage return
and a line feed. On the Okidata 92 <Esc> <CTRL-R> produces a line feed
without a carriage return.
Some printer codes cancel others retroactively so it is not always
possible to do what you want. Some things that should work, don't. For
example, in the above example you should be able to send a <CTRL-X> (or
decimal 24 after the word "TITLE" to cancel the correspondence & double
width effects. If you do it, however, nothing is printed even though the
<CTRL-X> comes after the word "TITLE." This is because the <CTRL-X>
code flushes the buffer where the word "TITLE" is stored until the print head
gets to the proper location. Only experimentation can tell you what will
work on your printer. It is possible to accidentally send a code that will
put your printer off-line so it won't print anything. If this happens, the
most reliable thing to to is to turn the printer off and back on again. This
will reset all it's values to normal.
To test the program initially, type PRINTER and then (at the prompts)
type "Hello World" <Enter>. "Hello World" should appear on the printer.
Then try various codes listed in you printer manual. There is usually
some way to do whatever you want and it's a lot easier than loading up
BASIC every time you want to reconfigure your printer.
This program can be run using WordStar's <R>un command but ONLY ONCE.
If you try to run it again without first exiting and re-entering WordStar
if will either lock up everything or crash WordStar. I think this is because
it is not quite a proper ".COM" file, not having been produced by MASM (it was
produced by the Manx Aztec C-compiler). If someone can tell me how to
successfully patch PRINTER.COM so this doesn't happen, I'll send *YOU* $5.00!
Dr. Bob
***************************************************************************
PRINTER CONTROL CODES
* Okidata 92 (most work on the 82 also)
KEY DECIMAL VALUE EFFECT
-----------------------------------------------------------------------------
| CTRL-L 12 Form Feed
| 30 Designates 10 Characters/Inch
| 28 " 12 "
| 29 " 17 " (ignored in corr. mode)
| 31 " double width characters
| 24 Clears buffer; resets print modes
| Esc CTRL-R (27) (18) line feed without carriage return
| Esc 0 (27) (48) Data quality print (default setting)
| Esc 1 (27) (49) Correspondence quality print
| Esc 6 (27) (36) Sets 6 lines per inch
| Esc 8 (27) (38) Sets 8 lines per inch
| Esc C (27) (67) Starts continuous underline
| Esc D (27) (68) Ends " "
| Esc T (27) (84) Sets emphasized printing
| Esc H (27) (72) Sets enhanced printing
| Esc I (27) (73) Stops emphasized or enhanced printing
| Esc N + (0) to (9) sets space between chars (default 0)
| (don't type the +) (works ONLY in correspondence mode!!)
| Esc % 9 + (1) to (144) sets space between lines.
-----------------------------------------------------------------------------
* Epson MX-80 (most work on the IBM & Gemini also)
KEY DECIMAL VALUE EFFECT
-----------------------------------------------------------------------------
| CTRL-L 12 Form Feed
| CTRL-N 14 " enlarged characters
| CTRL-O 15 " condensed "
| CTRL-T 20 cancels enlarged "
| CTRL-X 24 Clears buffer; resets print modes
| Esc 0 (27) (48) Sets 8 lines per inch
| Esc 1 (27) (49) Sets 7/72" per line
| Esc 2 (27) (50) Sets 6 lines per inch
| Esc 8 (27) (56) Ignore paper out
| Esc 9 (27) (57) cancel Esc 8
| Esc E (27) (69) Sets emphasized printing
| Esc F (27) (70) cancels " "
| Esc G (27) (71) Sets double strike
| Esc H (27) (72) Stops " "
-----------------------------------------------------------------------------